package com.example.lx6_8.adapter

import com.bumptech.glide.Glide
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.example.base.aa.entity.Goods
import com.example.lx6_8.R

class GoodsAdapter : BaseQuickAdapter<Goods, BaseViewHolder>(R.layout.item_goods) {
    override fun convert(holder: BaseViewHolder, item: Goods) {
        Glide.with(context).load(item.image).into(holder.getView(R.id.iv_goods))
        holder.setText(R.id.tv_goods, item.storeName)
        holder.setText(R.id.tv_goods_price, "￥" + item.price)
        holder.setText(R.id.tv_shou_goods, "已售" + item.sales+"件")
    }
}